/* 考试模块移动端样式 */

// 移动端容器通用样式
.mobile-container {
  width: 100%;
  padding: 10px;
}

// 通用移动端底部操作按钮样式 - 所有页面可复用
.mobile-action-container {
  position: fixed;
  bottom: 60px; // 确保不会被底部菜单栏遮挡
  left: 0;
  right: 0;
  padding: 12px 15px;
  background-color: #fff;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  z-index: 100;
  
  .el-button {
    width: 100%;
    height: 44px;
    font-size: 16px;
    letter-spacing: 1px;
    border-radius: 6px;
    
    & + .el-button {
      margin-top: 8px;
      margin-left: 0;
    }
  }
  
  // 多按钮横向布局
  &.horizontal {
    display: flex;
    
    .el-button {
      flex: 1;
      
      & + .el-button {
        margin-top: 0;
        margin-left: 10px;
      }
    }
  }
}

// 移动端树形组件样式
.mobile-tree-container {
  margin-bottom: 15px;
  padding: 15px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  
  .mobile-tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ebeef5;
    
    span {
      font-size: 16px;
      font-weight: bold;
    }
    
    .el-button {
      padding: 5px 12px;
      
      i {
        margin-right: 3px;
      }
    }
  }
}

// 考试配置页面样式
.mobile-submit-container {
  @extend .mobile-action-container;
}

@media screen and (max-width: 767px) {
  /* 通用容器样式 */
  .app-container {
    padding: 10px;
  }

  /* 移动端树形组件容器 */
  .mobile-tree-container {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);

    .mobile-tree-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
      
      span {
        font-size: 16px;
        font-weight: bold;
      }
    }
  }

  /* 移动端搜索表单样式 */
  .mobile-form {
    display: block;
    padding: 10px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;

    .el-form-item {
      display: block;
      margin-bottom: 15px;
      width: 100%;

      .el-form-item__label {
        padding: 0 0 8px;
        display: block;
        text-align: left;
        line-height: 1.2;
      }

      .el-form-item__content {
        width: 100%;
        display: block;

        .el-input,
        .el-select {
          width: 100%;
        }
      }
    }
  }

  /* 移动端工具栏样式 */
  .mobile-toolbar {
    margin-bottom: 15px;

    .el-button {
      display: block;
      width: 100%;
      margin-bottom: 10px;
    }
  }

  /* 移动端列表/卡片通用样式 */
  .mobile-card {
    margin-bottom: 15px;
  }

  /* 移动端分页样式调整 */
  .pagination {
    margin-bottom: 20px;
  }
}

/* 全局移动端辅助类 */
.mobile-hidden {
  @media screen and (max-width: 767px) {
    display: none !important;
  }
}

.desktop-hidden {
  @media screen and (min-width: 768px) {
    display: none !important;
  }
}

/* 移动端选择栏样式 */
.mobile-selection-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background-color: #f5f7fa;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
}

// 移动端树形组件切换按钮样式
.mobile-tree-toggle {
  margin-bottom: 15px;

  .el-button {
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    
    i {
      margin-right: 5px;
      font-size: 14px;
    }
  }
}

// 移动端搜索表单样式
.mobile-search {
  margin-bottom: 15px;
}

.mobile-form {
  .el-form-item {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;

    .el-form-item__label {
      display: block;
      text-align: left;
      padding: 0 0 5px;
    }

    .el-select, .el-input {
      width: 100%;
    }
  }
}

// 移动端工具栏样式
.mobile-toolbar {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

// 移动端卡片视图样式
.mobile-card-view {
  margin-top: 15px;
  
  .empty-data {
    text-align: center;
    padding: 40px 0;
    color: #909399;
    
    i {
      font-size: 40px;
      margin-bottom: 10px;
    }
    
    p {
      font-size: 14px;
    }
  }
  
  .mobile-card {
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05);
    transition: all 0.3s;
    
    &:active {
      transform: scale(0.99);
    }
    
    .el-card__header {
      padding: 12px 15px;
      border-bottom: 1px solid #f0f0f0;
    }
    
    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      
      .card-title {
        font-weight: bold;
        font-size: 16px;
        line-height: 1.3;
        flex: 1;
      }
      
      .card-actions {
        display: flex;
        
        i {
          font-size: 18px;
        }
      }
    }
    
    .card-content {
      padding: 10px 0;
      
      .info-list {
        margin: 10px 0;
        
        .info-item {
          margin: 8px 0;
          display: flex;
          flex-wrap: wrap;
          align-items: center;
          
          .label {
            color: #606266;
            margin-right: 5px;
            font-size: 14px;
          }
          
          .value {
            color: #333;
            font-size: 14px;
          }
        }
      }
      
      .details-section {
        margin-top: 15px;
        background-color: #f8f9fa;
        border-radius: 6px;
        padding: 10px 15px;
      }
      
      .exam-details {
        display: block !important;
      }
      
      .card-toggle {
        display: none;
      }
    }
  }
}

// 移动端分页样式
.mobile-pagination {
  margin: 20px 0 30px;
  
  .mobile-pagination-wrapper {
    width: 100%;
    border-radius: 4px;
    background-color: #f8f9fa;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    
    .pagination-row {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 8px;
      flex-wrap: wrap;
      
      &:last-child {
        margin-bottom: 0;
      }
      
      &.top-row {
        border-bottom: 1px solid #ebeef5;
        padding-bottom: 8px;
        justify-content: space-around;
      }
      
      &.bottom-row {
        padding-top: 5px;
      }
      
      .el-pagination__total {
        margin: 5px 5px 5px 0;
        font-size: 13px;
        color: #606266;
        font-weight: normal;
        white-space: nowrap;
      }
      
      .el-pagination__sizes {
        width: auto;
        margin: 5px 0;
      }
      
      .el-pagination {
        padding: 0;
        white-space: normal;
        background: transparent;
        text-align: center;
        width: 100%;
        
        &.is-background {
          .btn-next,
          .btn-prev,
          .el-pager li {
            margin: 3px;
            min-width: 28px;
            height: 28px;
            line-height: 28px;
            font-size: 12px;
            font-weight: normal;
            background-color: #fff;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
          }
          
          .el-pager li:not(.disabled).active {
            background-color: var(--theme);
            color: #fff;
            border-color: var(--theme);
          }
        }
        
        .el-pagination__jump {
          margin: 5px 0 5px 10px;
          font-size: 13px;
          color: #606266;
          display: flex;
          align-items: center;
          flex-wrap: nowrap;
          white-space: nowrap;
        }
        
        button {
          min-width: 28px;
          height: 28px;
          line-height: 28px;
          margin: 3px;
          padding: 0;
          font-size: 12px;
          background-color: #fff;
          color: #606266;
          border: 1px solid #dcdfe6;
          border-radius: 4px;
        }
        
        .btn-prev,
        .btn-next {
          padding: 0;
          width: 28px;
          height: 28px;
          line-height: 28px;
        }
        
        .el-pager {
          margin: 0;
          display: flex;
          justify-content: center;
          flex-wrap: wrap;
          
          li {
            min-width: 28px;
            height: 28px;
            line-height: 28px;
            margin: 3px;
            font-size: 13px;
            font-weight: normal;
          }
        }
      }
    }
  }
}

// 特小屏幕适配
@media screen and (max-width: 360px) {
  .mobile-pagination {
    .mobile-pagination-wrapper {
      padding: 8px 5px;
      
      .pagination-row {
        &.top-row {
          flex-direction: column;
          align-items: center;
          
          .el-pagination__total {
            margin-bottom: 8px;
          }
        }
        
        .el-pagination {
          .el-pager {
            li {
              min-width: 26px;
              height: 26px;
              line-height: 26px;
              margin: 2px;
              font-size: 12px;
            }
          }
          
          button,
          .btn-prev,
          .btn-next {
            width: 26px;
            height: 26px;
            line-height: 26px;
            margin: 2px;
          }
          
          .el-pagination__jump {
            margin: 5px 0;
          }
        }
      }
    }
  }
} 